Developer Documentation

QuickTime 4 API Documentation

Wired Movies and Sprites

| Previous | Chapter Contents | Chapter Top | Next |

Atom Types

kSpriteUsesImageIDsAtomType

This atom allows a sprite to specify which images it uses--in other words, the subset of images that its imageIndex property will ever refer to.

You add an atom of type kSpriteUsesImageIDsAtomType as a child of a kSpriteAtomType atom, setting its leaf data to an array of QTAtomIDs. This array contains the IDs of the images used, not the indices.

Although QuickTime does not currently use this atom internally, tools that edit sprite media can use the information provided to optimize certain operations, such as Cut, Copy, and Paste.

kSpriteImageRegistrationAtomType

Sprite images have a default registration point of 0, 0. To specify a different point, you add an atom of type kSpriteImageRegistrationAtomType as a child atom of the kSpriteImageAtomType and set its leaf data to a FixedPoint value with the desired registration point.

kSpriteImageGroupIDAtomType

Prior to QuickTime 3, sprites could only display images with the same image description. This restriction has been relaxed in QuickTime 3, but you must assign group IDs to sets of equivalent images in your key frame sample. For example, if the sample contains 10 images where the first 2 images are equivalent, and the last 8 images are equivalent, then you could assign a group ID of 1000 to the first 2 images, and a group ID of 1001 to the last 8 images. This divides the images in the sample into two sets. The actual ID does not matter, it just needs to be a unique positive integer.

Each image in a sprite media key frame sample is assigned to a group. You add an atom of type kSpriteImageGroupIDAtomType as a child of the kSpriteImageAtomType atom and set its leaf data to a long containing the group ID.

You must assign group IDs to your sprite sample if you want a sprite to display images with non-equivalent image descriptions (i.e., images with different dimensions).


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |